class AffectionBitvectorsController < ApplicationController
  # GET /affection_bitvectors
  # GET /affection_bitvectors.xml
  def index
    @affection_bitvectors = AffectionBitvector.all

    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @affection_bitvectors }
    end
  end

  # GET /affection_bitvectors/1
  # GET /affection_bitvectors/1.xml
  def show
    @affection_bitvector = AffectionBitvector.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.xml  { render :xml => @affection_bitvector }
    end
  end

  # GET /affection_bitvectors/new
  # GET /affection_bitvectors/new.xml
  def new
    @affection_bitvector = AffectionBitvector.new

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @affection_bitvector }
    end
  end

  # GET /affection_bitvectors/1/edit
  def edit
    @affection_bitvector = AffectionBitvector.find(params[:id])
  end

  # POST /affection_bitvectors
  # POST /affection_bitvectors.xml
  def create
    @affection_bitvector = AffectionBitvector.new(params[:affection_bitvector])

    respond_to do |format|
      if @affection_bitvector.save
        format.html { redirect_to(@affection_bitvector, :notice => 'Affection bitvector was successfully created.') }
        format.xml  { render :xml => @affection_bitvector, :status => :created, :location => @affection_bitvector }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @affection_bitvector.errors, :status => :unprocessable_entity }
      end
    end
  end

  # PUT /affection_bitvectors/1
  # PUT /affection_bitvectors/1.xml
  def update
    @affection_bitvector = AffectionBitvector.find(params[:id])

    respond_to do |format|
      if @affection_bitvector.update_attributes(params[:affection_bitvector])
        format.html { redirect_to(@affection_bitvector, :notice => 'Affection bitvector was successfully updated.') }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @affection_bitvector.errors, :status => :unprocessable_entity }
      end
    end
  end

  # DELETE /affection_bitvectors/1
  # DELETE /affection_bitvectors/1.xml
  def destroy
    @affection_bitvector = AffectionBitvector.find(params[:id])
    @affection_bitvector.destroy

    respond_to do |format|
      format.html { redirect_to(affection_bitvectors_url) }
      format.xml  { head :ok }
    end
  end
end
